<!--
 * @Author: wangzy
 * @Date: 2021-12-29 16:05:55
 * @LastEditors: wangzy
 * @LastEditTime: 2022-06-20 17:52:14
 * @Description: 
-->
<script lang="ts">
import { ref, reactive, onMounted, toRefs } from 'vue'
import { get_song } from './song_request'
export default {
  name: 'Song',
  setup() {
    let list = reactive({ songs: [] })

    let Get_song = (num: number) => {
      get_song({ id: num }).then((res) => {
        list.songs.push(...res.songs)
      })
    }
    onMounted(() => {
      Get_song(6537)
      setTimeout(() => {
        Get_song(6526)
      }, 2000)
    })
    return {
      Get_song,
      ...toRefs(list),
    }
  },
}
</script>
<template>
  <div class="song"></div>
</template>

<style scoped lang="scss">
@import 'song';
</style>
